refine __APPLE__ related preprocessor macros