Fixed LibCheck failure

This should fix the "not found" on strlcpy and similar.

The problem was that when checking headers with check_function_exists no linking flags were added.