On the hydraulics of Boussinesq and non-Boussinesq two-layer flows