Global CheriJNI init code moved to a separate function