Fixed issue 32: prefer loopback connection when client and broker are on the same machine