[js] don't try to run Error.captureStackTrace if it's not present
[js] don't try to run Error.captureStackTrace if it's not present

pleclech/hacking-haxe,pleclech/hacking-haxe,pleclech/hacking-haxe,pleclech/hacking-haxe,pleclech/hacking-haxe,pleclech/hacking-haxe