Apply url.withQueryParams fix from #1861

Fixes https://github.com/playframework/playframework/issues/1871