Replace use of #if defined with #if