Internal stress and the deformation phase transition in nanoscale barium-strontium titanate films