On the strength of nanoporous materials with the account of surface effects