Added IFNDEF to AddOnTerminate

Added to detect definition in Simba, to prevent redefinition here.
For compatibility reasons.