feat: support interop for namespace importing cjs function exports (#7914)
### Description
Some libraries unfortunately use the "deprecated" babel way to import
cjs dependencies.
`a.js`
```js
module.exports = () => {};
```
`b.js`
```js
import * as ns from "./a.cjs";
ns();
```