Fixed MacOSX compilation