Add RegExp.compile

This (useless) function is deprecated, but is here to provide some
semblance of compatibility.
Caveat emptor: it may not be around for long.