fix a bug in 32 bit linux build linking to pthread

In 32 bit build on linux compiler complains not linked to pthread. This pull request should fix this problem and does not affect the 64 bit build or windows build.