Fix EZP-20289 Symfony CSRF protection not integrated with legacy

This is the Symfony side of things injecting csrf settings if csrf is enabled
into api added in https://github.com/ezsystems/ezpublish/pull/552