Lindberg's effort from the right wing made it 26-24 before Dalibor Cutura found the net for Serbia in the final second.
In the other pool, Iceland secured its place in the quarterfinals by edging Sweden 33-32 with nine goals from Aron Palmarsson. It was the first defeat for Sweden.
Denmark and Iceland joined Croatia and defending champion France, who qualified for the knockout stage earlier Thursday.
Right winger Ivan Cupic scored seven goals to help Croatia beat Hungary 26-19, and France defeated Tunisia 25-19, including seven goals by left back Daniel Narcisse.
After leading 12-11 at halftime, France stepped up a gear in the second half to hand the African team its third straight defeat.
Argentina earned its first win of the tournament at the hands of Britain, 32-21, leaving the hosts with no points and a -62 goal difference.
In Group B, Victor Tomas Gonzalez and Jorge Maqueda Peno scored in the last 40 seconds to help Spain stop a late challenge by South Korea.
The 2008 bronze medallists won the game 33-29 after South Korea, led by Lee Jae-woo's eight goals, scored four quick goals from 31-25 down.