Fixes for the build on OS X 10.9