Fixed compilation (and MinGW specific) errors