Merge changes Iece22223,Iefad9d8d

* changes:
  Fix two msvc build issues
  Fix enc/dec mismatches for aq-mode 1 and 2