Fix compatibility with Java 6
 * Integer.compare was introduced in Java 7