Magnetostriction of thin flat superconductor in a transverse magnetic field