Define HAVE_AV_CONFIG_H only when building libraries