A few small changes to build cleanly on OSX Mavericks.