Improve workaround for C99 vsnprintf() in MS CRT

* Separate printing (c99_vsnprintf() and vsnprintf_truncate()) from return
  value truncation
* Improve c99_vsnprintf() as in http://stackoverflow.com/a/8712996
Use standard make variables and package discovery
Merge branch 'fix-buffer-overflow'