Phase transition from deformed to γ-instable Os isotopes and the structure of the giant resonances