Is there an easy way to sort a multi-dimensional array using qsort?