build: Check if g_type_init must be called explicitly

* configure.ac: Define G_TYPE_INIT_WRAPPER in config.h if g_type_init
must be called explicitly.
build: Fix some makefiles

* build-aux/Makefile.am.link: Replace .so by $(SOEXT).
* lib/Makefile.am (nclua.def, nclua.lib): Fix SOEXT usage.