Linking to SDL_hid_init() and other SDL_hid_* functions fail when using Emscripten SDL2 port (-s USE_SDL=2). However linking is successful when using SDL2 built using SDL2's CMake build system.
The hard coded list of files to compile for Emscripten's SDL2 port (here) is missing src/hidapi/SDL_hidapi.c used by SDL 2.0.18 and later. The official SDL2 build systems compile SDL_hidapi.c on all platforms to provide the SDL_hid_* functions for the API.