Differential cross sections, measured with guided ion beams: applications to N+ + N2 and C2H2+ + C2D4 collisions