fixed xcode build errors on osx