Improve ACX_PTHREAD usage