Fix to make building compatible with jdk 1.6 again