Cameron lets Labour take credit for gay marriage