Supersymmetry and generalized calibrations