Second harmonic generation and ferroelectric phase transitions in thick and ultrathin Pb0.35Sr0.65TiO3 films on (001) MgO substrates