Cherry-pick 485378eb5c5ea41bcd6ddedfe85de9bc635664ef
Per CAS-951 CAS 3.5.1 uses Java OpenSAML 2.x, which introduces minor changes into the XML payload sent to clients. Unfortunately these changes breaks the XML parsing routine for SAML in m-a-c. The patch here is intended to support 3.5.1 and previous versions and has been tested against both 3.5.1 and 3.4.12.