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!
Correct git_buf_text_is_binary() to match core-git