Fix compilation for Mac OS X/Quartz