Change SYS_DARWIN preprocessor checks to __APPLE__, they are specific