Wrangler Polyfill NodeJS Events not working

I currently have installed a package that uses NodeJS Event API and have node_compat = true in my wrangler.toml. Wrangler (v 3.47.1 and older) has issues resolving the following dependency from the package when it comes in a particular syntax, shown below:

import { setMaxListeners as nodeSetMaxListeners } from 'events';

I’ve found changing it to the following helps Wrangler resolve this but changing my installed node modules directly is not a sustainable solution.

import { EventEmitter } from 'events';
const emitter = new EventEmitter()
emitter.setMaxListeners(n, ...eventTargets)

Normally, I could just use compatibility flags to enable direct usage of this API but I have other packages that require the polyfilling so I am forced to use node_compat = true since the two approaches are mutually exclusive.

Is there some solution I can implement on the Worker so that I don’t need to open a PR into the package I am using? (@libp2p/interface version 1.1.5)