Computing Datalog Rewritings beyond Horn Ontologies