Stabilization of the internal kink mode in a tokamak by toroidal plasma rotation