Updating to work with MySQL

I had some trouble using this library with MySQL. These are the changes I've found to fix my problems. Do they still work for Postgresql?

I have some corresponding changes for the glottosAdmin that I can push if this PR is accepted.