Py3k-compatible sorting of 'kwargs.items'.