The method of Melnikov for perturbations of multi-degree-of-freedom Hamiltonian systems