Fix compilation on Mac OSX