Remove glib snippets and fix Makefile