Move atexit to libutils