Fix error where this.emit('error', error); doesn't exist

Forgot about this fix that I made a while back.

This fixes the `TypeError: 'undefined' is not a function (evaluating 'this.emit('error', error)')` error found in the gist that I posted on https://github.com/n1k0/casperjs/pull/604#issuecomment-23520287