Darboux integrability of a generalized Friedmann-Robertson-Walker Hamiltonian system