QKD using polarization encoding with active measurement basis selection