aesni: select `__cpuid` impl based on compiler type

MinGW provides both kinds of implementations of `__cpuid`,
but since `cpuid.h` is provided by GNUC, so we should choose
the implementation by the compiler type instead of OS type.

Signed-off-by: Pengyu Lv <pengyu.lv@arm.com>
diff --git a/library/aesni.c b/library/aesni.c
index 322a255..b90e7f9 100644
--- a/library/aesni.c
+++ b/library/aesni.c
@@ -33,10 +33,12 @@
 #if defined(MBEDTLS_AESNI_HAVE_CODE)
 
 #if MBEDTLS_AESNI_HAVE_CODE == 2
-#if !defined(_WIN32)
+#if defined(__GNUC__)
 #include <cpuid.h>
-#else
+#elif defined(_MSC_VER)
 #include <intrin.h>
+#else
+#error "`__cpuid` required by MBEDTLS_AESNI_C is not supported by the compiler"
 #endif
 #include <immintrin.h>
 #endif
@@ -53,7 +55,7 @@
     if (!done) {
 #if MBEDTLS_AESNI_HAVE_CODE == 2
         static int info[4] = { 0, 0, 0, 0 };
-#if defined(_WIN32)
+#if defined(_MSC_VER)
         __cpuid(info, 1);
 #else
         __cpuid(1, info[0], info[1], info[2], info[3]);