The source project of this merge request has been removed.
Solves #7 (closed).
I believe this is the simplest solution.
I have tested it, and it works correctly, but please double-check.
I already have a copyright assignment to the FSF, I can send it to you by mail if you want.