Adjust to Go tip changes

It does not like breaking aliasing rules, so let's keep a casted pointer
for when libgit2 wants that.