Fix test link errors on Windows. Tested on Windows 8 with VS2010.
Merge branch 'master' into spire.

Hopefully the last merge.