A bifurcation theorem for noncoercive integral functionals