Fix several MS compiler warnings.
Merge pull request #231 from joshayers/ms_compiler_warnings

Fix several MS compiler warnings.