Fixed check for wget_wch to not rely on header

As per pasis suggestion at #421
Merge branch 'master' into xep-0223