Fixes to the build script and Makefile.