Change OpenGL pixel store settings to happen immediately after context creation. Otherwise crash could result when restoring texture data. Fixes #344.