Fix NoClassDefFoundError in SLF4J and Commons logging providers when the requisite classes are not available.