build-sys: Use AX_PTHREAD macro from autoconf archive