added compressed option to privkey_to_pubkey_bin