Fixed a couple of missing defs

Converted a couple of statements from #if to #ifdef. 
Made doing #if on an undefined macro an error