Fixes for windows build against python 3