Fix incompatibility with Symfony2 2.1

All credits go to @restyler

See: https://github.com/nelmio/NelmioApiDocBundle/pull/237

Closes: #231
Replaces: #237