When rendering to PNG, draw to an FBO rather than default framebuffer.

This means that it doesn't matter if the window if partially placed off screen when reftests run.

Fixes #3470.