Added in support for pthread_detach