Shaped pulses for transient compensation in quantum-limited electron spin resonance spectroscopy.