Avoid buildenv conditional in thread_option struct