fix der encoding of signatures

This patch fixes lack of leading zero byte for numbers which are less
than 2**255 and the first bit is set.