fix build with MSVC2012
Merge branch 'master' into coverity_scan