Fix the RegExp constructor.

When called as a function, the RegExp constructor did not work properly. This commit makes it instantiate itself when called as a function.