Minimum changes to compile with sdl