bug fix for pthrread library linking