Backport of upstream commits 4c1544a7f3 and 9c90719f37. The 1.8
version constraint makes HDF5 2.x hdf5-config-version.cmake reject
the config file, and the FindHDF5 wrapper fallback then fails to
locate the HL component.

--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -113,9 +113,8 @@ message(STATUS "TinyXML_LIBRARY: ${TinyXML_LIBRARY}")
 INCLUDE_DIRECTORIES( ${TinyXML_INCLUDE_DIR} )
 
 # hdf5
-find_package(HDF5 1.8 COMPONENTS C HL REQUIRED)
+find_package(HDF5 COMPONENTS C HL REQUIRED)
 INCLUDE_DIRECTORIES (${HDF5_INCLUDE_DIRS})
-link_directories(${HDF5_LIBRARIES})
 # hdf5 compat
 #ADD_DEFINITIONS( -DH5_USE_16_API )
 #ADD_DEFINITIONS( -DH5_BUILT_AS_DYNAMIC_LIB )
