Fixing MacOSX compilation