Make libgit2 check work as expected