ref(profiling): Conditionally shim cjs globals
The shims should only be applied if the globals are not present, else it results in double decl and a runtime error. The profiling SDK should gracefully handle env where the shims are already provided.
I couldn't find a way to modify the shim as it is hardcoded in the plugin we are using so I went with the replace plugin approach and a placeholder value #poormansmacros.
Fixes https://github.com/getsentry/sentry-javascript/issues/13259
~I need to add an e2e test before this can be merged~
@AbhiPrasad mind taking another look, I added the check to run experimental modules and bumped to v22 of nodejs for profiling e2e tests
Thanks for the reviews @AbhiPrasad @mydea!