This will bring this meterpreter in line with the other meterpreter
payloads so that the getenv feature works consistently across them.
I also had to tweak the way the TLVs were stored so that we could
support the notion of having more than one value appear that is of
the same type.
As this repo it is no longer in external/source directory, the deploy
targets need to know where the Framework repository is. This defaults to
../metasploit-framework, but can be changed via -D deploy.path= command
line switch.
Apparently, getNetworkPrefixLength can return -1, which confuses the Ruby
side. Therefore fall back to guessing the prefix in this case, as we do it
for Java <= 1.6.