The cmake scripts can't handle the semicolons in gcc's version output. Filter them out before detecting the version.