fix a bug in screen capture of GlutWindow