Fix regexpr search for upper case strings

I broke the regexpr search for upper case strings earlier. The problem
was that REG_ICASE was not passed to regcomp and friends, only
regexec, which resulted in no match on glibc.
Fix this here. Also make sure that regexpr options that do not support
case insensitive matching always use the "always convert" slow path.
Also fixes an obscure compiling problem with some ifdef configuration.