genmail is not correctly handled as a shared lib on windows (I should add declspec(dllimport/export))