Manual merge of pull request https://github.com/Unidata/netcdf-c/pull/64 contributed by nschloe.  Assorted CMake improvements.