Detect ASan at run time instead of compile time.

This way ASan-specific behavior (disabled seccomp filters) can be
enabled in the case when libminijail built w/o ASan is linked to an
ASan executable.

Bug: 27980137
Bug: 30252254
Change-Id: I219365041c339b65eb41d21d9a7dcbff7664f8e6
diff --git a/util.h b/util.h
index 7c14f0a..d63590e 100644
--- a/util.h
+++ b/util.h
@@ -46,16 +46,10 @@
 #endif
 }
 
-static inline int running_with_asan() {
-#ifndef __has_feature
-#define __has_feature(x) 0
-#endif
+void __asan_init(void) __attribute__((weak));
 
-#if __has_feature(address_sanitizer)
-	return 1;
-#else
-	return 0;
-#endif
+static inline int running_with_asan() {
+	return &__asan_init != 0;
 }
 
 int lookup_syscall(const char *name);