osx compiling fix