fix compilation on JDKs (i.e. OpenJDK 7) that are not able to deduce the generic type