add the OS_ENV patch as well, and enable the option to scons
add fixed up OS_ENV patches (cherry-picked in the repo)