Magnetic anisotropy of embedded Co nanoparticles: Influence of the surrounding matrix