Make tests compile under JDK 6

Sadly InetAddress.getLoopbackAddress didn’t come along until JDK 7.