Try harder to determine the build environment