Cross-platform port finder

Added: cross platform hack.