Fixed Mac OSX compilation