Fixed build script for Mac and Linux in demo1