Bertrand versus Cournot with convex variable costs