Check the port in addition to just the server names in isSameHost()
Work around for migration issues on non-64 bit systems