Updated build scripts to include mem lib.