Add Riak support
Merged with upstream original