#20 Replace hash.to_s on json in track_stats

Avoid the use of Perl-style backrefs.