Add conditional compilation for Mac OS X