Fix git_parse_dirty to work with git ~> 1.8