[JBJCA-1082] Don't use security manager unless necessary