Appveyor x64 compile issue

Fixes issue #346 where compilation for windows x64 was failing, preventing pre-compiled binaries for the same architecture from being created.

Also fixes a couple of small issues with tests failing.