Work around a calling convention mismatch between MinGW and VC++