Work around buggy thread_local on AIX