Workaround for SecurityException for java.lang classes.