The first law of thermodynamics for Kerr–anti-de Sitter black holes