Support both MinGW and MSVC