pthreads: fix thread attribute handling