make it work with recent JSON.pm