A novel approach to the determination of equilibrium properties of classical Hamiltonian systems with long-range interactions