Equivalence of geometric engineering and Hanany-Witten via fractional branes