Darwin thread_local fixes