MySQL 5.6 Compatibility

Added compatibility for MySQL 5.5 and 5.6. Also fixed innodb stats for 5.1
Borrowed some fixes from Asher Feldman at Wikipedia