Added fixes mentioned in #3205

Fixed compilation bug on Mingw 4.7.2
Changed uint directives to unsigned int like suggested.