A thermodynamic model of the lamellar to inverse hexagonal phase transition of lipid membrane-water systems