add polyfills for regex methods