The cohomological nature of the Fu-Kane-Mele invariant