osx build fixes