Two-phase equilibrium conditions in nanopores