IE8 compatibility, only log to console if defined
Merge pull request #4 from CEXMCote/master

IE8 compatibility, only log to console if console is defined