fixed a couple of osx compiling issues