Fix support for custom collators with LSM trees.
closes #544