fixed "g_hash_table_lookup: assertion `hash_table != NULL'" in mdb_set_default_backend
replaced malloc/free with glib versions
replaced strcasecmp and snprintf with glib versions