fix(util/thread_script_state): add a better workaround for clang++ bug

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
fix(util/thread_script_state): add a better workaround for clang++ bug