Build like pygit2

`setup.py` config options I borrowed from the pygit2 project.