Fix compiler warnings on OSX