Fixes to pygit2