Switched to non-async-safe thread name code.