fix default_index_prefix to return nil if Rails not defined