support compiling on Mac