On the thermodynamics of fluids adsorbed in porous media