Influence of mechanical boundary conditions on the electrocaloric properties of ferroelectric thin films