Dynamic virtual holonomic constraints for stabilization of closed orbits in underactuated mechanical systems