SDL: Fixed "stale global reference" causes
These changes were cherry-picked from SDL 2.  I'll be fully upgrading to SDL 2, so this is just a temporary fix in the mean time.
Merge branch 'master' into paulscode/issue-30
Merge branch 'master' into paulscode/issue-30
SDL: Missed a DECLSPEC ... SDLCALL