Add MinGW platform makefile and related source changes
Remove extra [:digit:] from tr command
Add workaround for missing strnlen.

Enabled by default, define HAVE_STRNLEN to disable workaround.
Merge pull request #64 from Vproject/mingw

Add MinGW platform makefile and related source changes