Support for 32bit

Hi,
I had a couple of small issues when compiling and running this on a 32bit machine.
The expiry not being explicitly set made it default to a 64int, which other libraries couldn't read. Setting it to the max available made it work.

Let me know what you think of the changes.
Thanks!