Deal with OS X vs glibc differences in qsort_r