Ensure SDL.quit is always called last regardless of exceptions