libgit2: init threads before using libgit2