Fixed compiling with SDL2, although it still doesn't run properly.