Fix compile warnings on OSX compile