Improve building from Git head.