implement Function.prototype.bind in legacy.js (closes #465)
closes #460, again. Plus some linting