Do not try to compare strings using C preprocessor

This code apparently tried to feed a CMake-level string into a C
preprocessor for comparison via ==, which won't work. For example, it
evaluates to true on MSVC. Fix this by checking compiler-specific
macros.
diff --git a/compat/compat.h.in b/compat/compat.h.in
index acc5fc7..9383f2d 100644
--- a/compat/compat.h.in
+++ b/compat/compat.h.in
@@ -40,7 +40,7 @@
 #  endif
 #endif
 
-#if (@CMAKE_C_COMPILER_ID@ == GNU) || (@CMAKE_C_COMPILER_ID@ == Clang)
+#if defined (__GNUC__) || defined (__llvm__)
 # define UNUSED(x) UNUSED_ ## x __attribute__((__unused__))
 # define _PACKED __attribute__((__packed__))
 #else