Use inet:gethostname/0 instead of ugly hack