If to ifdef

Changed #if directives to more pedantic #if defined when only the existence of the macro matters.