Fix TypeError: Cannot read property '0' of undefined

The problem was a callback registered with PubSubClass that wanted to
change the callback list, while PubSubClass was busy iterating over it.

Fixes https://github.com/brinley/jSignature/issues/51
Merge pull request #54 from mgedmin/fix-type-error-2

Fix TypeError: Cannot read property '0' of undefined