Fix V8 detection

Error.prepareStackTrace is undefined by default. Use
Error.captureStackTrace instead.