mesa: apply patches (fix #1193)