define and use qsort_r_gnu for different systems