Maxwell’s equal-area law for Gauss–Bonnet–Anti-de Sitter black holes