Only log to console if the function exists
Remove unecessary console.log
Merge pull request #190 from theodi/bugfix-fix-ie-issues

Fix in IE