Make n-queens benchmark compatible with older GHCs

The change in 957b959dbeb14c3b2d10998d67310e880c01a7dd
caused n-queens to break with older versions of `base`
which still have `Foreign.unsafePerformIO` in place.