[Sanitizer][Darwin] Support OS versions before DRIVERKIT

Fixes https://github.com/llvm/llvm-project/issues/56960

Differential Revision: https://reviews.llvm.org/D131288

GitOrigin-RevId: 9ec4ddd224f400e2ec309fa513904525c059cc1e
diff --git a/lib/sanitizer_common/sanitizer_platform.h b/lib/sanitizer_common/sanitizer_platform.h
index ea4e5b0..32005ee 100644
--- a/lib/sanitizer_common/sanitizer_platform.h
+++ b/lib/sanitizer_common/sanitizer_platform.h
@@ -90,7 +90,7 @@
 #  else
 #    define SANITIZER_IOSSIM 0
 #  endif
-#  if TARGET_OS_DRIVERKIT
+#  if defined(TARGET_OS_DRIVERKIT) && TARGET_OS_DRIVERKIT
 #    define SANITIZER_DRIVERKIT 1
 #  else
 #    define SANITIZER_DRIVERKIT 0