Fix to build scripts, by Stefan Stefanov