.toNumber returns NaN for some large numbers.

This PR addresses the issue, but not the root cause.
Needs testing to verify that calculation is still correct.
Merge pull request #2 from diversario/nan-issue

.toNumber returns NaN for some large numbers.