[ASan] Replace CMake if/APPEND/endif with append_if