Note: Maybe it will be much better to fix that issue inside configure so it will inject -lpthread by itself when needed!