Update to latest libgit2 API changes.

This fixes #381.
Ugh, yeah, right. Thanks! :smile: