Make the test suite build on GHC 7.2.
Fix test suite failures on Windows.
Warnings on older GHCs.