Add qsort that takes a comparison function as parameter