Rwandan President Paul Kagame has criticized South African President Cyril Ramaphosa over his claims that the M23 rebel group is a militia.