automatically find the SDK version, allow SDK_VERSION env var, deal w ubuntu bug