cmake: fix commit f3a50a01a7616ce8dd350a39b7b0f71a1ebe536a

* link common with c lib (required for gold linker)
* fix the macro to properly set the library variable
  => use the variable instead to hardcoded value
linux: openSuse don't follow the FHS, so manually pick the lib path