Fixed deadlock on Mac OS X during thread affinity check.

During thread affinity setting, an erroneous #ifndef APPLE caused the Mac OS X
binary to enter the code path that assumes thread affinity support to exist,
leading to a deadlock later on. This is fixed, by making the printing of a
warning platform-specific, but not the rest of the code path, as presumably
originally intended.

Change-Id: I95bd808552869ece45efd1b818c1b5e1be03ed94