Changes to make it work on Windows (tested with Python34) on Windows7