Implement OS-specific support for thread names.