Backport SDL2 fix from upstream

Commit: http://hg.libsdl.org/SDL/rev/e217ed463f25

Description:
Fixed a build error in SDL_platform.h when using Code Blocks and MinGW