nc_test explicitly uses libm
move macro defintions behind option settings

This allows us to access HDF5 variables in the macros.
tests are using HDF5 explicitly, so link against HDF5
Merge branch 'link-what-you-use' of https://github.com/nschloe/netcdf-c into nschloe-link-what-you-use
Merge branch 'nschloe-link-what-you-use'