trying to support C++ destructors - not working

Destructor functions defined using
__attribute__((destructor)) do work, however.

From reading docs online, we may need to support
the __cxa_atexit function.  I think this is how
C++ destructors (for statically allocated objects)
are implemented.