Fixed osx compilation