fix crash on CPU not having AVX support

Hi,
the _xgetbv() instruction lead to a crash on my laptop (i7 Q740), producing a "illegal instruction" error.
It seems some checks have to be performed before calling this instruction, I have added them and included them below.

Regards,
Gregory