fix osx build issues