Stabilization of tearing modes by modulated electron cyclotron current drive