Pionic transition from Y(4260) to Zc(3900) in a hadronic molecular scenario