Fix test suite to work with perl 5.18. Closes: #719969