Here's a diff/patch I made off a freash git clone with the changes mentioned and some makefile changes I used.
Thanks much, oroqen. Changes compile fine and make sense.
Why +USE_UPNP:=1 ? I thought setting this flag to 0 made it embed PNP (hence faster and more distributable to other machines).