How to wire a portable generator to a irrigation pump
Your pump doesn't use neutral.  So there's no need or reason to modify anything.  

Regardless... You would never modify an extension cord like that, because then it'd be dangerous to use anyplace else.  If you must violate Code, you can do it more sanely by getting a NEMA 5-20 plug, and jumper it internally neutral to ground with a #12 wire, and just plug it into the generator in an unused 5-20 socket. 

A 5-20 plug looks like a common 5-15 but with a sideways neutral.  The beauty of it is the generator will take it, but few other sockets will.