Berry phase for many-spin system with the uniaxial anisotropic exchange interaction in a time-dependent magnetic field