Fix usage of deprecated method in portmapping