Fixed linked libs for win32

Closes #948
Closes #843