Bunch of SDL fixes that are needed for running Open Syobon Action.