build: probe the compiler to see if we need to turn down _FORTIFY_SOURCE

Some builds don't use Release (such as Gentoo, though it can be told
to).  So let's go a bit further and probe the compiler to see if we need
to turn down the _FORTIFY_SOURCE level.
Merge pull request #1514 from jszakmeister/better-fortify-detection

build: probe the compiler to see if we need to turn down _FORTIFY_SOURCE