mods for osx compiling