Differentiate between OSX and iOS

__APPLE__ is defined for both iOS and OSX.  When compiling for iOS this leads to including crt_externs.h which is not available on iOS.