Copy of the basic tokyocabinet gem with a small fix for ruby 1.9