Fixed const correctness issue with C++, and fixed building SDL_memcpy4 with 32-bit gcc.
Fixed XIM crash when locale is set to something not supported by X11.