Tweak test associated with thread and set _REENTRANT when appropriate.