devtools: fix version search with git < 2.7.0