Compile fixes for ghc 7.6.1
Merge pull request #145 from alexanderkjeldaas/master

This makes it compile for me on ghc 7.6.1