- Use the Windows type `HMODULE` on Windows, and define a local alias to
it on non-Windows. This makes the code slightly clearer about the
nature of the value `handle`.
- Move the `dlopen` emulation into the anonymous namespace to encourage
inlining, since the wrappers are trivial name/signature compatibility
functions.
- Move the error reporting out of the template function, so that it is
not redundantly instantiated for each type used with the template.
Global data will default to nullptr, so the initialization is
unnecessary. Some compilers may store the pointer in `.data` when it is
initialized to any value.