porting FreeBSD's /usr/src/lib/libc/regex to win32