'undefined' pattern should be treated as empty string in RegExp constructor

http://www.ecma-international.org/ecma-262/5.1/#sec-15.10.4.1
https://sourceforge.net/p/htmlunit/bugs/1599/