Fix checking of TARGET_* symbols