Upscale department store Neiman Marcus Group moved to a net loss in its second quarter as costs related to a data breach hit earnings.