Stick-slip model for kink band formation in shear zones and faults