[IM] Allow more control over the hostname in Utils::genURL()