Fix warnings on osx build