Fix issue 12183 : Avoid using floating point in std.algorithm.sort.

- Prevent valgrind from aborting (some x87 FP operation are not supported).
- Can be slower on machines that have a soft floating point ABI.