Some JS engines don't preserve insertion order for numeric keys.

Fixes #290.