Add better support for Windows and Python 3