Don't use deprecated GLib threading API.