Only call console.error if it's available
Merge pull request #1 from DavidJRobertson/master

Only call console.error if it's available