Check IRB is defined before using it, fixes #64