Change default hostname value to 127.0.0.1

If IP address cannot be determined, we now default to 127.0.0.1 instead of 0.0.0.0. This fixes #245