fix compiling on OS X