Neiman Marcus Group swung to a loss in the first quarter as charges from its sale to a private-equity firm hit earnings.