Thanks for pointing it out, the documentation page is misleading.
The 3.40 tarball (available
here) contains the correct NetAnim version - which is 3.109. I.e., 3.109 works with ns-3.27 and following.
If we'll beak compatibility, we'll release an upgraded NetAnim version.
However, please note that there are some known bugs in NetAnim, so some features might not be perfect. E.g., on my computer the WiFi signals are not plotted, but I haven't got the time to debug it.