Protect initialization of ResourceLinkFactory when running with a SecurityManager. This is the fix for CVE-2016-0763