Fix binary packer to work on Java <= 7