Prediction of thermodynamic properties of fluids confined in nanoporous media using molecular simulations