Fix g++ warnings on OSX