Only tag kernel with git info if it's available

Only tag the kernel with git branch/commit information if git is
available and the retrieval of git information succeeds.