Make substitute replace ${VARS} with environment values.

Make substitute replace ${VARS} with environment values IF they have no value set in defines.
This allows the use of ${ANDROID_SDK} inside extensions XML files.