detect proper libdwarf types - try #2

My suspicion for failing on CentOS is because we set the dwarf const
variable to "0" instead of 0 which surprisingly is not in the list of
many things that evaluate to false:
http://www.cmake.org/Wiki/CMake:VariablesListsStrings

According to ptarjan this PR should trigger a CentOS build, so I hope
this works.

Previous message:
=================
Current master is broken by libdwarf once again. Other than checking for
a particular init function we should also check if we're allowed to use
a const char* for name separately.

Combined them into a macro for future changes.