Make tests pass

A few tweaks to make all tests pass (without warnings) on modern perls.