Reworked platform-dependent bits, now compiles on Windows with SDL2.