Initial attempt at adding joystick support to Emscripten.

I've broken the build entirely, though; Emscripten fails immediately during an eval. Did I make a typo?