The patch fixes [undefined reference to `g_thread_init'] as suggested by http://ragnermagalhaes.blogspot.ru/2007/09/undefined-reference-to-gthreadinit.html