test: whoops toJSON isnt available in older node versions.