Determination of the radiative widths of the η′ and A2 from two-photon exchange production