Attempt to recover from an UnknownHostException.  If getLocalHost()
throws an exception, attempt to provide the IP address instead.  This
is useful on those systems without a hostname explicitly defined.