WFLY-2777 fixing class loader issue in jndi external binding

Exactly the same fix has been already preapproved by Stuart.

https://issues.jboss.org/browse/WFLY-2777