Cmake fixes

The main `CMakeLists.txt` has a couple of flaw that make it impossible to compile netcdf-fortran on a fairly default system (Ubuntu 12.04). The pull request fixes those.