Update stripConsole to support window.console

This update accommodates `window.console` and it will avoid modifying `myconsole.log` or `my.console.log`.

Fix for ticket #18025: https://bugs.dojotoolkit.org/ticket/18025