Determination of the Gamow–Teller strength function for the neutron-deficient isotopes 104–107In