Improve standalone build script