Fix header module support.

Store the compile definitions, include directories, and link libraries
that are specified in a header module's CMakeLists.txt (and not just
those from library modules).