configure.ac: add pthreadstubs support