Only check for __APPLE__ macro on Mac OS X.