Support both symfony 2.0 and 2.3