Fix x86 Windows build and testsuite

Authored by Phyx on Dec 5 2016, 3:27 PM.

Description

Fix x86 Windows build and testsuite

Summary:
Fix issues preventing x86 GHC to build on Windows and
fix segfault in the testsuite.

Test Plan: ./validate

Reviewers: austin, erikd, simonmar, bgamari

Reviewed By: bgamari

Subscribers: #ghc_windows_task_force, thomie

Differential Revision: https://phabricator.haskell.org/D2789