fix compilation on Mac OSX