fixing osx compilation issues