replace all remaining internal uses of pthread_self with __pthread_self