Fixes #130.

Normally revpos will be a long, but in some cases,
it will be an int. This fix handles both cases.
Merge pull request #132 from couchbaselabs/fixes-130

Fixes #130.