use RFC 2396 URI parser in the mock object

this fixes `env_for` on ruby trunk