Fixed and improved the specific changes required to build on Windows which closes issue #31.