Changed #if directives to #if defined.