windowscodecs: Add locking to the GIF decoder.