Fix OSX compilation