backport fix from sdl hg to get screen refresh rate on osx