Practical discrete-state QKD with lossy channels : avoiding unambiguous state discrimination attack