Add exit callback mechanism when 'esc' is pressed in the glut window.