Marvel officials scrambled to cast Mark Ruffalo as Hulk in 2012's The Avengers