Fix crash in Timer::AdjustTimers.

Refs #4865
Fix incorrect #endif in icinga-app.cpp.

Refs #4865