Same-sex religious marriages to get the go-ahead from September