I had time to tinker around and, with willingness from the ngIRCd developers to patch their test suite, came up with a relatively simple solution. The relevant patch to the test suite is not necessarily as portable as ngIRCd requires it to be (or maybe it is) so this might not be the patch that will make it upstream, but on the meanwhile here it is.