Also use the __APPLE__ predefined define instead of MACOS for enabling
these code paths.
This also avoids having to link to the CoreServices framework in
order to get the Gestalt function.
This gets rid of the code that parses /proc/cpuinfo, and avoids
forking within the library.
The previous code also failed build on modern glibc versions
due to ignoring the return value of the system, read and write
system calls.