Fixing compilation on OSX