vlib: use pthread_attr_setstack() to set thread stack