Gauge Invariance of the Chern-Simons Invariant Modulo Integers