fix test to work on perl < 5.12