Move global declaration of _UPGRADE_NOTIFY to before its use.