userpref: fix incorrect use of BIO_get_mem_data() when generating keys (closing #32)