The h8/300 simulator now handles signals and exit codes correctly, so this hack is no longer required.