Use a helper function instead of relying on Function.prototype.bind

Fixes #28.