build: detect GNU Assembler AVX-512 bug and disable AVX-512 variants if needed