fix nonce for 32-bit systems

2^31 is too big for 32-bit systems, so just cap at 2^30 instead as a cheap fix.
Merge pull request #1 from aaronpk/master

fix nonce for 32-bit systems