unify static and dynamic linked implementations of thread-local storage