Fix detection of host-part in uri for non standard ports

Fixes bug #20.