egl/wgl: Make ref_count atomic