Fix BN_[pseudo_]rand: 'mask' must be used even if top=-1.