Rather than using NativeDetector we should use AotDetector so that we can run AOT-generated code on the JVM as well.