Check if console.warn is defined before calling it
Check for window.console, and code style changes
Merge pull request #441 from mhahne/master

Check if console.warn is defined before calling it