How to override native function with Puppeteer