fix build on mingw C++11 mode
should use #ifdef , not #if