Strong correlation and ferromagnetism in (Ga,Mn)As and (Ga,Mn)N