Fixed compilation errors on MacOSX
Fixed compilation errors on MacOSX