How about this one?
if (!~process.execArgv.indexOf('--harmony')) { throw 'Node.js must be run with --harmony flag'; }
How about this one?