Casting to int in mg_sprintf() call in handle_cgi