Fixed windows compilation errors (Mingw and MSC compatibility)