Include git's sha1.
sha1: add compatibility stuff to compile it outside of git
Add sha1 computation.