fixed gcc and mingw compilation