fix Mac OSX build