Upgrade build script for new naclports common.sh