Beijing criticized the U.S.’s track record on global warming while climate envoy John Kerry was in China seeking greater cooperation on the issue.