Forked from standard "encoding/asn1" to allow more permissive decoding