Fix missing header

And just use g_snprintf() while at it..