posix: Add pthread thread-local storage