hwtest.js: Fix median computation

By default Array.prototype.sort() sorts all values by converting
them to strings, even numbers!