How mining companies are adapting to newly assertive African states