Fix potential LFS related issues

This patch-set supersedes the #3 PR (but needs testing on Solaris)
Why wouldn't it? The last released `unix` already depends on `CApiFFI` on works with back to GHC 7.4.1