fix a bug in 32 bit linux build linking to pthread