Dynamic critical behavior of the XY model in small-world networks.