Refractory element depletion and the determination of abundances in H II regions