Add portable implementations of asprintf and vasprintf.