Fixed random image generation.
Added Halide generated files as link dependency for Linux build.