On the origin of solar metric type II bursts