-lregex is required for mingw, but is apparently not available on other systems