Minor (and quickly hacked) patch to make it build on recent versions of Xcode.