Emulate the new port selection API for WinMM.

WinMM does not support a good port selection scheme.
At least wine seems to ensure reliable port ids.
Emulate the new port selection API for WinMM.

WinMM does not support a good port selection scheme.
At least wine seems to ensure reliable port ids.

This patch got lost between the different source trees.