php: Bring back Base256 helper to properly encode/decode the UID

Using pack/unpack with V placeholder for 32bit unsigned integer doesn't
work properly on 32bit systems.