Towards a dispersive determination of the pion transition form factor