Base58 encoder/decoder in PHP