Tweak the sdl main loop to avoid oversleeping on windows