Add support to set the thread name.