Fix compilation for OSX