Fixes and two new TLVs

Creating a pull request, as suggested.
These are the same patches as those at rt.cpan.org.