C++: make qsort to compitable with linux