test: use new thread create function

g_thread_new() is used instead of
g_thread_create() because g_thread_create() is deprecated since
GLib 2.32.0.