Test if variable is defined before executing GCC test