Role of ions in the colloidal synthesis of gold nanowires