on MinGW32, use compiler provided [v]snprintf
release thread handle
Merge pull request #105 from pijyoi/master

win32 fixes