Add support for static constructors and destructors

Needed for C++ or for __attribute__ ((constructor))