Fix extern for dlopen in MacOSX