OK, after some research, I found out that OWLReasoner also has a function to get super classes. This method includes the super classes from imported ontologies and has even the possibility to distinguish between direct and indirect superclasses. It's a bit strange though that getClassesInSignature() includes those without accessing the reasoner but this works fine and solved my problem.
The code would be
NodeSet<OWLClass> superclasses = reasoner.getSuperClasses(c, true);
to get the classes. The return type is different, whch is why the following has to be changed as well:
for (org.semanticweb.owlapi.reasoner.Node<OWLClass> parentOWLNode: superclasses) {
OWLClassExpression parent = parentOWLNode.getRepresentativeElement();