Added dynamic pthread linking