Hannover have secured a deal to bring in Vladimir Rankovic from Bayern Munich at the end of the season.