Fix tag parsing for recent git version.