Treat window.console the same as plain console, fixes #18025