Fixes to compile and run using Xcode 5.02 and 64bit mode.