On calculating scattering phase shifts by the generator coordinate method