fixing compilation error in intelliJ (was compiling fine with sbt though)
nested ifdef processing now happens at the #endif instead of each case. Also, avoids problem with empty #ifdef blocks.