jscript: Implement Array.prototype.filter.