Workaround for issues on JBOSS 7.2, as of https://github.com/mjiderhamn/classloader-leak-prevention/issues/7
Patch supplied by GitHub user maartenc