Fixes to allow building in OS X Mavericks/Xcode 5.