added g_type_init() calls for linux
added compilation switch for mac osx