Make url generator compatible

fixes an issue introduced in https://github.com/symfony/symfony/commit/8cd8ec001aa7e750871558d7253427d28ab91