Remove mainloop_running as it's unnecessary (and the GLib version was broken).