fixed code for building dlls