Carbon tax could help China head off tariff threat