Fix library link order.