Base usage o -Wno-pedantic on compiler version.

Also replaces a regex with use of VERSION_LESS.