Tokumx compatibility bug fixes

Fix a few bugs, including tests not passing on platforms not officially supported by TokuMX.