buildhistory: Sync with bitbake changes

Adjust to the recent changes in the git fetcher. This code should work
with current and previous versions of bitbake and can be cleaned up when
we move to new bitbake versions.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>