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

Note that this still isn’t fully spec-compliant, since it shouldn’t be configurable.
`RegExp.prototype.flags` throws as per the spec.