Sathyas patches

Provides the patches from https://github.com/gsathya/SDL-emscripten to Daft-Freak's upstream repository.