openrisc: delay: fix handling of counter overflow