Use getHostName instead of getHostString for JDK6 compat