Fix compatibility with GHC 7.4 and older