ceres-solver failed to build on 10.9 Mavericks

Here is the logs: 

https://gist.github.com/anonymous/7146414

Update:
Patch extracted from Core Solver developers' code:  https://groups.google.com/forum/#!topic/ceres-solver/RWAvy0TbI4A