Mattel CEO to retire at year's end