fix infinite loop
compatibility with libgit2 0.18.0