tidied up build/doc more, adding option to build static binaries