Fix wrong conversion from JS object to Perl hash