Maximum Likelihood Decoding for Gaussian Noise Channels with Gain or Offset Mismatch