Added support for compiling with MSVC