build: fix automake warnings about the use of INCLUDES

While we're at it, reduce the use of LIBS as well. This makes dependencies
explicit.

Fixes building with (the not-yet-merged) libsecp256k1 as well.

PR as requested in #4650.