MinGW-w64 only links in libssp if a function needs stack protection.
Since my toolchain doesn't have libssp enabled, this results in the
previous check passing (-fstack-protector-strong with a nearly empty
test program does nothing), but other tests end up failing because
libssp isn't available.
Use a test program with varargs, based on the C99 vsnprintf() wrapper
for older versions of MSVC.
MSVC 2002 introduced the /GS flag, and it's enabled by default as of
MSVC 2005. Added a check for 2002/2003, even though those versions
definitely aren't supported.
gcc added -fstack-protector and -fstack-protector-all in gcc-4.1,
and -fstack-protector-strong in gcc-4.9. Prefer strong if it's available,
then fall back to -fstack-protector-all then -fstack-protector if
strong isn't available.