Deformations of supergravity and supersymmetry anomalies