Should fix #67. Added a catch to define console and console.log if they're not there. Not elegant, but it'll do.