Indirect optimization of interplanetary trajectories including spiral dynamics