The stack is 16 byte aligned according to the ABI, but gcc assumes 32
byte alignment during register spilling (doesn't re-align the stack
pointer), resulting in ~50% chance of a crash.
Avoid this issue by disabling detection of AVX2 compiler support when
compiling with mingw-w64.
Upstream bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54412
This is a backport of core#24727