Universal magnetic fluctuations in the two-dimensional XY model