Add missing #ifdef's to fix build break