Proper support for non-ELF/gcc systems (using libtool?)

Rewrite the preferences dialog code (it's really nasty right now,
being largely a bad Glade hack)
