Removed raw references to __APPLE__; now just check to see if it is defined.