Fix listeners that have arguments failing to bind

It's because the function prototype has a length property that
indiciates the number of arguments that it accepts. This doesn't work
everywhere IIRC, but it does work in most places, so when I changed
the test to bind with a function that accepted arguments, the test
fails.

I've re-used the same `typeof` test (you use later on in the code) to
check whether the handler is a function or not.

Closes #3.