more fixes to build a dll