Cross relaxation in time-dependent nuclear spin systems: Invariant trajectory approach