Minor MSVC fixes and improvements

Fixed undeclared variable in MSVC compile function;
Added MSVC support for Visual Studio 2013