Growth of organic molecules in planetary atmospheres via ion-molecule reactions