Compile a limited subset of regexp() into SQL LIKE

Also adds some support for MySQL in the regex compiling
code.