Added looking for thread library