added missing defined() in #elif

gcc >= 4.4 requires a condition in #elif.

We often had something like: 

#ifdef COND_X
#elif  COND_Y
#endif

In most cases the #elif should be #elif defined(COND_Y) to check if COND_Y is defined.