Revert "do not build or enable pthread debug"

This reverts commit 1df230f5872cbce1fb9f6ddcbecd186cc07c19b4.