Sorry, 4.0 is an old version that we no longer publish fixes for. It has likely already been fixed in a later version.
You should be able to run 4.1 to do a GIF export, then go back to using 4.0 if you must. Just be sure not to save your project with 4.1.
Otherwise you could try running the latest 4.0 version, which is 4.0.64.