port autodetection added for ajax bridge used with file:// protocol