Fix GCC 4.8 undefined behavior warnings.
Fix UNICODE define in SDL not taking effect properly with new MinGW.