unsafeForeignPtrToPtr from Foreign.ForeignPtr is deprecated since GHC 7.6