Extrinsic size effect of pyroelectric response of ferroelectric films