Fix Mac OS X build

without these patches VW does not build on Mac OS X