Fix for undefined Error.captureStackTrace.

`Error.captureStackTrace` is a v8 extension, in other browsers (Firefox, PhantomJS...) failed assertion yields exception with message like `Error.captureStackTrace is not a function`.