Fix gettid is not defined error.