Spatial magnetization profile in spherical nanomagnets with surface anisotropy: Green's function approach