SC declares NAB chairman appointment illegal