unix: fix build when !defined(PTHREAD_MUTEX_ERRORCHECK)

Ancient versions of glibc (<= 2.3.1) don't have error-checking mutexes.