[toolchain] gcc: fix getenv() patches for 4.4.7 and 4.5-linaro