Pass VM instead of JSGlobalObject to RegExp constructor.