Update to new GLib thread API

I like it. It's cleaner.