On applicability of Gibbs thermodynamics to nanoparticles