Made it compatible with MSVC