Fixing swig cache

If `options.cache === true`, swig expects the value returned to be `'memory'`, otherwise an error is thrown.
Merge pull request #1407 from jonlong/swig-cache-fix

Fixing swig cache