Some changes for windows dll support.