support for non-std::string keys

rebased agains develop as per CornedBee request