autotools: added AC_CONFIG_MACRO_DIR
autotools: check for ssl.h if pkg-config failed

Some distros provides libssl without openssl.pc.