Add missing #ifdef ... #endif