use try_compile() instead of custom execute_process

The previous setup made a number of assumptions, e.g., on the
compiler executable name, which made the setup fail
unnecessarily in many cases.
This commit removes much of the custom code and resides to
CMake's own functionality.

Fixes bug #9 and bug #12.
Merge branch 'try-comple' of https://github.com/nschloe/netcdf-fortran into nschloe-try-comple
Merge branch 'nschloe-try-comple'