Fix to compile with newer versions of GHC