Making GHC buildable on Mac

These patches make GHC buildable on Mac.