ISPN-4942 Make uber jars compatible with OSGi

https://issues.jboss.org/browse/ISPN-4942

All existing tests for OSGi are passing with these changes.