On the complexity of computing the 2-Selmer group of an elliptic curve