Fix getting invalid hash when 2nd time when CGit::GetHash() is called and UseLibgit2 is false

(Fixes issue #1729)

Signed-off-by: Sup Yut Sum <ch3cooli@gmail.com>