I've encountered several compilation issues while following these instructions. The most annoying issue I encountered is this one. It happens that "fgetwc" is not defined. It might be related to some out of date header files and re-installing XCode's command line tools forces their updates.
In short, I've solved it with:
$ xcode-select --install
You'll be prompted to re-install Xcode or just the command line tools, chose the latter.
sanderd17 suggested to propose a patch for the build script, but I'm confident I'd only mess it up. Pointing it out here would be better.