Make console.log check more robust; fixes IE8
Build dist