Hamiltonian perturbation theory in noncanonical coordinates