It is not possible to compile images for TL-MR3040 v2.0.
Even on the download domain there is only an image for MR3040 v1.0.
But you can manipulate v1.0 images for flashing on v2.0 device regardless you downloaded the image or compiled it yourself.
Just open the image file (squashfs-factory version) with an hexadecimal editor like hexedit or octeta:
At offset 0x0040 the value is 30 40 00 01. Change the byte at offset 0x0043 so that the new value is 30 40 00 02 as you can see in the image above. Now save the file e.g as mr3040-v2-squashfs-factory.bin.
On my MR3040 v2.0 device I succed flashing the mr3040-v2-squashfs-factory.bin image file.
Note: My device did not run the original TP-Link firmware. It run an image manipulated by nebbia88.