Don't build headers when jni building is disabled.