fix compiling on MacOSX issue