Adaptation for 4.7 toolchain and build scripts