Generate debug HUD text with ostringstream instead of snprintf.

This should fix #730.