Fixes for Java 7 branch and Karaf 2.2.11