Use unsafePerformIO from System.IO.Unsafe for GHC 7.8 compatibility