Do not use deprecated glib function g_atexit

atexit is part of stdlib.h.