Crucial role of nuclear dynamics for electron injection in a dye-semiconductor Complex