pass DynFlags to genPrim to make ccs primops working when WayProf is not provided