Make the default doc index file path compiler/arch/os-dependent.

Fixes #2135.