Change line 242 logic to #ifdef

Fix to incorrect SPARK_CORE test logic at line 242