fix for list of length 0

Fixes https://github.com/mongosoup/rmongodb/issues/42.