Fix handling of console.warn for older browsers