Declared atexit as weak.

Added replacement stub for cstdlib `atexit()` funciton.