The nature of Hα star-forming galaxies at z ∼ 0.4 in and around Cl 0939+4713: the environment matters