various osx/xcode build fixes