Merge patches from KDE/krfb

We embedded our own copy of libvncserver because libvncserver wasn't released with the necessary patches at some point in the past.

These two commits were applied to our copy, which would be nice to get upstream when we remove our bundled copy.