Add platform independent macro to control MG_DLL