[js] define console in non-es5 mode (closes #3245)
[js] define console in non-es5 mode (closes #3245)

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