adding ghc 7.8 compatibility to the atomic primops

this patch seems to pass tests and allow 7.8 to use atomic-primops