libs/core/ip: fix prefix length handling in Hex() constructor