Ferromagnetic transition induced by a two-dimensional hole gas in semimagnetic quantum wells