US department-store operator JC Penney swung to a full-year net loss as the company was hit by restructuring charges.