Effect of two-photon exchange on the charged pion form factor