Fix for older versions of mysql_config which don't have --variable=...
Don't build a static convenience library, we need PIC symbols when generating a so
Fix missing include of ctype.h