fixes for the AVX detection (yes, just because a CPU has AVX support does not mean the kernel does too -- silly Google developers). Thanks to Mikolaj Kucharski <mikolaj at kucharski dot name> for reporting the stack overflows, testing proposed patches and this back ported patch against the current release. ok sthen@