Made xml loader compatible with symfony 2.2

This one updates the xml loader to be compatible with upcoming symfony 2.2
I've kept the BC with older sf versions if this is not wanted please let me know and I'll remove the check...