2 fixes to make it build-able on OS X