Fixed compilation on MacOSX