fix thread ID to longjmp environment index mapping

Signed-off-by: Xin Xie <xxie@nvidia.com>