Fix various issues with build environment installtion