Replaced OpenSSL's implementation of printf-like functions with calls to snprintf.

Adopted from a patch by the OpenBSD team.