Modify PortMapper constructor to fix #31.