osx compilation fix