Restrict base versions.

unsafePerformIO was removed from base in 4.7 and was already deprecated
in 4.6. By bumping the cabal version and restricting base version we are
able to change the import reliably.

An alternative solution would be to keep the base <5 constraint and use
CPP to make the import.