Make memcache work with ruby 2.1

Detect ruby version 2.1+ and use appropriate #define statement