Fix compilation for Mac OS X