BUGFIX: Added check whether terminator instruction has function to query for successors

It appears that the RET llvm instruction does not provide the getNumSuccessors and
getSuccessor function. Work around this by assuming that any instruction which does
not have the getSuccessor method just has 0 successors.