Add if-def switch for MacOS X