added changes from https://github.com/aerialship/SamlSPBundle/pull/38