mk: use extra cflags when linking libs with compiler
When using the compiler to link libraries, include EXTRA_CFLAGS. This is
needed when cross-compiling to pass --sysroot, for example. GCC
cross-compilers built with Yocto don't use the --with-sysroot option,
making it necessary to pass the --sysroot command-line option.
This is the same solution as in commit
e8fbb6d9cfd9 ("mk: use extra cflags
when linking with compiler"), but applied to libs instead of apps.
Signed-off-by: Gage Eads <gage.eads@intel.com>