Backport Git build to 1.10 branch.