Changes to allow VC++ compilation