added stdlib; otherwise, NULL is undefined in GCC