fix compile error on linux; on_exit is declared in stdlib.h