Interface effect on the magnitude and stability of ferroelectric polarization in ultrathin PbTiO3 films from first-principles study