Fix Mac OSX compilation