Activate destructor of OSX application to cleanup correctly.