Fix MinGW build

Could you change this to `defined(_MSC_VER)`?