config.m4: search for both library and header

The old code only tried to find the header file, but we need both the
library and the header file. Add a new block to locate the header file
in some standard locations.