Strain anisotropy and magnetic domains in embedded nanomagnets