Make `RegExp.prototype.flags` more spec-compliant

Note that this still isn’t fully spec-compliant, since it shouldn’t be configurable.
Thanks, but I prefer my original implementation, which works on every browser, even if it doesn't map 1:1 to the spec steps.