cmakedefine01 always defines the macro, so #ifdef is always true. Use #if instead. (cherry picked from commit 3198d7c3)