Merge pull request #46 from junyer/master

Initial tweaks to get MSVC working.