Variational principles for scattering in the generator coordinate method