COMP: VS 2012+ compile fixes and CMake warnings

Change-Id: I75632beed3f535ceccfb6299d02839b0dfab9ff0
Merge branch 'VS2013' into release-3.20

Change-Id: Ie18a1eb1de2037b21a9e4ec6af74bd751741f9e0