make it work with SecurityManager too (when part of boot classloader)