Build regex.c for Solaris. Added required defines for Solaris
strcasecmp is in <strings.h>
Check for NULL before passing it to vsnprintf
Merge pull request #2304 from jacquesg/solaris

Solaris!