update RegExp y-flag polyfill: String#replace support