Hyundai Motor swings to net loss in third quarter as costs of engine issues weigh