Adds SDL2 support and fixes Windows build.