Detect vendor versions of GNU Compilers

Cray and other HPC vendors provide patched versions of the GNU compilers
with modified version strings.  Use re.search instead of re.match in the
version detection scripts to account for modified version strings.

Ref: https://github.com/numpy/numpy/issues/4259
Merge pull request #4261 from ahmadia/allow_vendor_compiler_versions

BUG: Detect vendor versions of GNU Compilers