Update OSX build-deps script
Fix OSX build and minor things detected by clang
More osx stuff