Fix for URIs with a query string not matching

Fix for https://github.com/zendframework/zf2/issues/3711 — URIs with query strings no longer match in 2.1, matched fine in 2.0.5.