Now hexchat doesn't abnormally terminal when started as root.

This fixes #589/#504.