Replace g_strdup_printf with std::to_string
Latest version of MinGW-w64 supports it just fine
Fixes a memory leak in the onUserInfo callback