perf_hooks: fix rangeerror
Fixes: https://github.com/nodejs/node/issues/54768
A proposed ad-hoc fix for that issue.
As mentioned there I'm not sure how to test since it's implementation detail https://github.com/nodejs/node/issues/54768#issuecomment-2329690458