Partial fix for out of source builds

Patch from LRN

Perl's makefile needs fixed and the relative include
of config.h needs removed from hexchat.h

Mentioned in #1018