moved pthread to end of link order