set port based on os