Some changes to get SMO working on windows