cpp: use #ifdef __MINGW32__ to avoid compiler complaints

... instead of just #if