Copied changes from gmond_python_modules repo to add support for MySQL 5.6+ (plus other fixes)