Use hardcoded hostname if getCanonicalHostname fails 

Fixes #109