Influence of the surface transition layers on the pyroelectric properties of a ferroelectric bilayer film