Avoid using unpack() for NUL-padded string

PHP broke backward compatibility in 5.5.0; thank you so much!