fix RangeError problem for large arrays
Merge pull request #5 from addaleax/master

Fix RangeError problem for large arrays