Cloaking with optimized homogeneous anisotropic layers