added ifdef for DLL building