Australia legalizes same-sex marriage