ios and osx build fixes