Add a compileToCore function to the GHC API