Don't crash if the alarm gen_event server is not there (i.e. app is not running).
Merge bug25627 (again)