SDL2 compatibility fixes.