Merge pull request #2327 from akoeplinger/fix-msvc