put longopts array into alphabetical order