Signed/unsigned is a parameter rather than an input port to lpm_mult. So it can't be changed during run time. I didn't try, but I guess, that in case of a hardware multiplier, two multiplier instances and a multiplexer are inferred from your code for this reason. A software (logic cell) multiplier should be able to incorporate the signed/unsigned switch during fit.
As said, the input size should 2*9 bit. I guess, assigning the input to a 18 bit value forces the multiply operands to be positive, thus signed multiply is eliminated. Also, cause the full multiply result is 36 bit, you don't get it correctly in the signed case.