correctly propagate the return value of ldap_set_option
otherwise LDAP_OPT_REFERRALS won't be set to 0 and in turn
active directory paging will stop working
(Operations error on ldap_control_paged_result_response)
Merge pull request #6218 from leo-b/fix_ldap_setOption_returncode

correctly propagate the return value of ldap_set_option