Support webkit gamepad api

Perhaps returning `EMSCRIPTEN_RESULT_NO_DATA` here on undefined rather than `EMSCRIPTEN_RESULT_INVALID_PARAM` would be more useful? See comment above.