adjust ErrorElement for symfony 2.5 - in sonata 2.2 branch

backport the fix into the 2.2 branch so that people using the current sonata version do not have to upgrade their whole admin to go to symfony 2.2

cherry-picked the fix from #2027 into 2.2 branch.