Fixed compilation on OSX