Fixes to compile and run under Xcode 5.02 and 64bit.