Fix various issues compiling the code with Xcode 5 against the 10.9 SDK