Gravitational lensing in general relativity via bifurcation theory