Tweak predefined macro checks to compile on Mac OS X