Build on OS X 10.9

Changes required to build on Mac OS X 10.9