modified link order for pthread