fixed some compile error in mingw