fixes to compile on windows vs2012
Merge pull request #2306 from danthemellowman/bug-fix-windows-build

fixes to compile on windows vs2012