Fixes #1 (32-bit cast issue).
Merge pull request #3 from mezis/fix/32-bit-friendly

Fix: 32-Bit friendly
Fixes API weirdness
Merge branch 'master' into test/broken-find-for-duplicate-references