Check for existence of console.warn since it may not exist even if console is defined (IE11).