Minor fixes to build script. Update libraries.