Make plot_closed_orbit compatible with older MATLAB releases