It seems like the gnulib tls module doesn't actually help much. Drop
it, and implement suitable shims directly in the error handling code.
It does not look like gnulib performs any feature tests regarding the
TLS functionality: it simply goes and uses the appropriate functions
for the selected API (posix, isoc, windows or none).
With the exception of destructor callbacks, all of these TLS APIs are
essentially identical.
Changing this doesn't fix the problem with TLS destructors on Windows
but it does delete almost 2 kilobytes of disfunctional gnulib code
that purports to implement TLS destructors without actually doing so.