Avoid malloc poisoning issue when including <pthread.h> of uclibc (#1013)