snprintf was only added in Visual Studio 2015. This adds support for building using Visual Studio versions prior to 2015. This implementation of snprintf has been taken from platform.c