Commit the rest of the OSX build fixes missed in the previous commit.