Two-loop relation between the bare lattice coupling and the MS coupling in pure SU(N) gauge theories