Same-sex behavior is linked to genetics, study finds