Visual Studio 2013 compilation support: added some #ifdef _MSC_VER for unsupported code in MSVC.