Merge pull request #191 from euanh/build-improvements

Build improvements