Added conditional detections for glFramebufferTexture/glFramebufferTexture2D.