Fix out of source builds

Fixes #1018
win32: Fixed build break due to 7a4a024
merge from hexchat/master