Z_2 Invariants of topological insulators as geometric obstructions