Reversible Mechanical Switching of Magnetic Interactions in a Molecular Shuttle