Update with latest changes from upstream

* Update to revision 727 from http://abuse.zoy.org/wiki/dev, merging in
CMake and Win32-related changes