build: Correcting library detection

When detecting location of the library, `includes` and `libpath`
variables must be used instead of `cxxflags` and `linkflags`.  While the
latter also makes everything work, it results in unexpected behavior:
waf always adds LINKFLAGS* in the beginning of the linking command,
which can screw up order in which libraries are selected (e.g.,
system-installed library can be chosen instead of the compiled version).

Change-Id: I9ed36e8a4e8523b33ca2e88414aed8de5111c9cd