use atexit from stdlib

g_texit is deprecated

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=740269