Magnetoelastic and magnetoelectric couplings across the antiferromagnetic transition in multiferroic BiFeO3