fix Array.prototype.sort

Issue https://github.com/tessel/runtime/issues/470