Fix some compile issues on Xcode 6 and OS X 10.9.